
{{ $page := .page }}

{{ $tokens := partial "tokensFromPagePath" $page.Path }}
{{ $name := partial "nameFromPagePath" $page.Path }}
{{ $tag := partial "tagFromPagePath" $page.Path }}

{{ $depth := len $tokens }}

<div id="{{ $tag }}">

{{ printf "<h%d class=\"section-header\">" $depth | safeHTML }}
  {{ $page.Param "title" | markdownify }}
{{ printf "</h%d>" $depth | safeHTML }}

<div class="section-content">
{{ partial "shiftHeadings.html" (dict "page" $page "level" $depth ) }}
</div>

{{ range ($page.Param "entries") }}
  {{ with $page.GetPage . }}
    {{ partial "sectionLayoutPartial.html" (dict "page" . ) }}
  {{ end }}
{{ end }}

</div>
